package com.example.group_20.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.group_20.entity.Students;
import com.example.group_20.entity.Teachers;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author: 栋
 * @data: 2023/8/11
 * @descriptions:
 */
@Mapper
public interface TeacherMapper extends BaseMapper<Teachers> {

    @Select("select * from teachers where t_id=#{t_id}")
    public Teachers findByid(String t_id);
    @Update("update teachers set t_email=#{t_email},t_tel=#{t_tel},t_password=#{t_password} where t_id=#{t_id}")
    public int updateInfor(Teachers teachers);

    @Select("select * from teachers")
    public List<Teachers> findAll();

    @Delete("delete from teachers where t_id =#{t_id}")
    public int deleteById(String t_id);


}
